home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / ncsat.cpt / Telnet2.5 final / tcpip / whatami.h < prev   
Encoding:
C/C++ Source or Header  |  1992-04-05  |  3.5 KB  |  143 lines

  1. /*
  2. *    Whatami.h
  3. *  Machine specific information for NCSA Telnet TCP/IP kernel
  4. ****************************************************************************
  5. *                                                                          *
  6. *                                                                          *
  7. *      NCSA Telnet                                                         *
  8. *      by Tim Krauskopf, VT100 by Gaige Paulsen, Tek by Aaron Contorer     *
  9. *                                                                          *
  10. *      National Center for Supercomputing Applications                     *
  11. *      152 Computing Applications Building                                 *
  12. *      605 E. Springfield Ave.                                             *
  13. *      Champaign, IL  61820                                                *
  14. *                                                                          *
  15. *    Copyright (c) 1987, Board of Trustees of the University of Illinois   *
  16. *                                                                          *
  17. ****************************************************************************
  18. *   Defines for TCP/IP library, are you a Mac or a PC?
  19. */
  20.  
  21. #ifndef MAC
  22. #define PC 1
  23. #define ETHER 1
  24. #define UB 1 
  25. #endif
  26.  
  27. #define ETHER
  28.  
  29. #ifndef ETHER
  30. #define ATALK 1
  31. #endif
  32.  
  33. #define NOT_FROM_SLIP 0        /* BYU 2.4.16 */
  34. #define FROM_SLIP 1            /* BYU 2.4.16 */
  35.  
  36. /*
  37. *   Defines which have to do with Ethernet addressing versus Appletalk
  38. *   addressing.  Ethernet has 6 bytes of hardware address, ATALK has 4
  39. */
  40. #ifdef ETHER
  41. #define DADDLEN 6
  42. #define WINDOWSIZE 4096
  43. #define TSENDSIZE 512
  44. #define DEFWINDOW 1024
  45. #define DEFSEG    1024
  46. #define TMAXSIZE 1024
  47. #define UMAXLEN 1024
  48. #define ICMPMAX 300 
  49. #else
  50. /*  define for AppleTalk */
  51. #define DADDLEN 4
  52. #define WINDOWSIZE 4096
  53. #define TSENDSIZE 512
  54. #define DEFWINDOW 512
  55. #define DEFSEG    512
  56. #define TMAXSIZE 512
  57. #define UMAXLEN 512
  58. #define ICMPMAX 300 
  59. #endif
  60.  
  61.  
  62. #ifdef PC
  63. /*
  64. *  define length of an integer
  65. */
  66. typedef char int8;
  67. typedef unsigned char uint8;
  68. typedef int int16;
  69. typedef long int int32;
  70. typedef unsigned int uint16;
  71. typedef unsigned long int uint32;
  72.  
  73.  
  74. #define TICKSPERSEC 18
  75. #define SMINRTO 5
  76. #define WRAPTIME 86400L                /* in seconds, only for PC */
  77. #define NPORTS    30
  78. #define CONNWAITTIME 20                /* default contime in seconds */
  79. uint32 longswap();
  80.  
  81. #else
  82. /*
  83. *  define length of an integer
  84. */
  85.  
  86. #define NFDEF {0,0,0}
  87. #define NBDEF {65535,65535,65535}
  88. #define BFDEF {0,61183,11060}
  89. #define BBDEF {61183,2079,4938}
  90. #define UFDEF {1,0,0}
  91. #define UBDEF {0,0,0}
  92.  
  93. typedef char int8;
  94. typedef unsigned char uint8;
  95.  
  96. #ifdef MPW
  97. typedef short int int16;
  98. typedef long int int32;
  99. typedef unsigned int uint;
  100. typedef unsigned short int uint16;
  101. typedef unsigned long int uint32;
  102. #define ctop(x) x
  103. #define ptoc(x) x
  104. #define index(x,y) strchr(x,y)
  105.  
  106. #define malloc(A) NewPtr(A)
  107. #define free(A) DisposPtr(A)
  108.  
  109. #else
  110. typedef int int16;
  111. typedef unsigned int uint;
  112. typedef long int int32;
  113. typedef unsigned int uint16;
  114. typedef unsigned long int uint32;
  115. #endif
  116.  
  117. #define TICKSPERSEC 60
  118. #define SMINRTO 25
  119. #define NPORTS    30
  120. #define CONNWAITTIME 20                /* default contime in seconds */
  121.  
  122. #define    longswap(x) x
  123. #define intswap(x) x
  124. #ifndef MPW
  125. #define movebytes(x,y,z) movmem(y,x,z)
  126. #define movenbytes(x,y,z) movmem(y,x,z)
  127. #else
  128. #define movebytes(x,y,z) memcpy(x,y,z)
  129. #define movenbytes(x,y,z) memcpy(x,y,z)
  130. #endif 
  131. #define n_putchar(x) putchar(x)
  132. #define n_puts(x) putln(x)
  133. #define NPORTS    30
  134.  
  135. #ifdef MPW
  136. #define FALSE false
  137. #define TRUE true
  138. #endif MPW
  139. #endif
  140.  
  141. #include "netevent.h"
  142.  
  143.